﻿using System.Collections.Generic;

namespace MyWebApplication
{
    public class SearchModel
    {
        /// <summary>
        /// 非查询条件参数
        /// </summary>
        public static readonly List<string> NotConditions = new List<string> { "_search", "nd", "records", "orderBy", "sord", "pageIndex" };

        /// <summary>
        ///  Key：每页的记录数
        /// </summary>
        public static readonly string KeyRecords = "records";

        /// <summary>
        ///  Key：排序字段
        /// </summary>
        public static readonly string KeyOrderBy = "orderBy";

        /// <summary>
        ///  Key：排序方式
        /// </summary>
        public static readonly string KeySord = "sord";

        /// <summary>
        /// Key：当前页码
        /// </summary>
        public static readonly string KeyPageIndex = "pageIndex";

        /// <summary>
        /// 查询条件
        /// </summary>
        public Dictionary<string, object> Conditions = new Dictionary<string, object>();

        /// <summary>
        /// 每页的记录数
        /// </summary>
        public int Records;

        /// <summary>
        /// 当前页码
        /// </summary>
        public int PageIndex;

        /// <summary>
        /// 排序字段
        /// </summary>
        public string OrderBy;

        /// <summary>
        /// 排序方式
        /// </summary>
        public string Sord;

    }
}